package com.example.demo.service;

import java.util.List;

import javax.annotation.Resource;
import javax.transaction.Transactional;

import org.springframework.stereotype.Service;

import com.example.demo.entity.MyUser;
import com.example.demo.repository.MyUserRepository;

@Service
public class MyUserService {
	
	@Resource
	private MyUserRepository mRepository;
	
	@Transactional
	public MyUser insert(MyUser myUser) {
		return mRepository.save(myUser);
	}
	
	public List<MyUser> findAll() {
		return mRepository.findAll();
	}
	
}
